Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind-boot: look for ESPs on the same disk(s) as bootfs #700

Merged
merged 1 commit into from
Dec 2, 2021
Merged

bind-boot: look for ESPs on the same disk(s) as bootfs #700

merged 1 commit into from
Dec 2, 2021

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Dec 1, 2021

Right now, to find the ESP devices, we just query all the devices on the
system with the matching partition type. This is clumsy though. E.g. in
case multipathing is in use, this will match both the multipathed
version and the non-multipathed versions.

Another case is multiple re-installs of the OS on different disks: we're
working to ensure that users don't have multiple boot filesystems, but
haven't so far required them to also wipe old ESPs. So we want to ensure
we only modify the ESPs on our boot disk.

Rework things by trying to be smarter: since we know what the right boot
filesystem is (coreos-boot-edit.service uses --boot-mount), use that
knowledge to derive the ESPs by only looking for them in the same
storage hierarchy.

@jlebon
Copy link
Member Author

jlebon commented Dec 1, 2021

I tested this + coreos/fedora-coreos-config#1316 with:

$ kola run multipath.day1 ext.config.reboot coreos.boot-mirror

Sadly I already closed that tmux pane, but I can assure you all three tests passed. :)

Right now, to find the ESP devices, we just query all the devices on the
system with the matching partition type. This is clumsy though. E.g. in
case multipathing is in use, this will match both the multipathed
version and the non-multipathed versions.

Another case is multiple re-installs of the OS on different disks: we're
working to ensure that users don't have multiple boot filesystems, but
haven't so far required them to also wipe old ESPs. So we want to ensure
we only modify the ESPs on *our* boot disk.

Rework things by trying to be smarter: since we know what the right boot
filesystem is (`coreos-boot-edit.service` uses `--boot-mount`), use that
knowledge to derive the ESPs by only looking for them in the same
storage hierarchy.
@bgilbert
Copy link
Contributor

bgilbert commented Dec 1, 2021

coreos.boot-mirror

At present, that only proves that we found a parent device for /boot on RAID 1, not that we successfully found an ESP on it. It'd be good to test that explicitly.

@jlebon
Copy link
Member Author

jlebon commented Dec 1, 2021

coreos.boot-mirror

At present, that only proves that we found a parent device for /boot on RAID 1, not that we successfully found an ESP on it. It'd be good to test that explicitly.

I've manually checked it, though will look at adding it to core.boot-mirror as well.

src/blockdev.rs Show resolved Hide resolved
@jlebon jlebon merged commit 78e2a7a into coreos:main Dec 2, 2021
@jlebon jlebon deleted the pr/esp-fixes branch December 2, 2021 14:30
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Dec 2, 2021
This is similar to the tests added in `ext.config.reboot` as part of
coreos/fedora-coreos-config#1316, but for the
boot mirroring tests.

Specifically, it adds coverage for ESP devices discovery in a RAID1
setup (coreos/coreos-installer#700).
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Dec 2, 2021
This is similar to the tests added in `ext.config.reboot` as part of
coreos/fedora-coreos-config#1316, but for the
multipath tests.

Specifically, it adds coverage for correct handling of the multipathed
ESP partition (coreos/coreos-installer#700).
@jlebon
Copy link
Member Author

jlebon commented Dec 2, 2021

coreos.boot-mirror

At present, that only proves that we found a parent device for /boot on RAID 1, not that we successfully found an ESP on it. It'd be good to test that explicitly.

I've manually checked it, though will look at adding it to core.boot-mirror as well.

coreos/coreos-assembler#2594

jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Mar 22, 2022
This is similar to the tests added in `ext.config.reboot` as part of
coreos/fedora-coreos-config#1316, but for the
boot mirroring tests.

Specifically, it adds coverage for ESP devices discovery in a RAID1
setup (coreos/coreos-installer#700).
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Mar 22, 2022
This is similar to the tests added in `ext.config.reboot` as part of
coreos/fedora-coreos-config#1316, but for the
multipath tests.

Specifically, it adds coverage for correct handling of the multipathed
ESP partition (coreos/coreos-installer#700).
jlebon added a commit to coreos/coreos-assembler that referenced this pull request Mar 25, 2022
This is similar to the tests added in `ext.config.reboot` as part of
coreos/fedora-coreos-config#1316, but for the
boot mirroring tests.

Specifically, it adds coverage for ESP devices discovery in a RAID1
setup (coreos/coreos-installer#700).
jlebon added a commit to coreos/coreos-assembler that referenced this pull request Mar 25, 2022
This is similar to the tests added in `ext.config.reboot` as part of
coreos/fedora-coreos-config#1316, but for the
multipath tests.

Specifically, it adds coverage for correct handling of the multipathed
ESP partition (coreos/coreos-installer#700).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants